/**
 * 
 */
package org.stars.dao.exception.parser;

import org.stars.config.Message;
import org.stars.dao.sqlmapper.SqlBase;
import org.stars.dao.sqlmapper.SqlMacro;
import org.stars.dao.sqlmapper.SqlMapper;


/**
 * The Class MacroNotDefinedException.
 *
 * @author Francesco Benincasa
 */
public class MacroBodyNotAdmittedException extends MacroValidationException {

	public MacroBodyNotAdmittedException(SqlMapper sqlMapper, SqlBase sqlDef, SqlMacro sqlMacro)
	{		
		this(Message.MACRO_BODY_NOT_ADMITTED_ERROR.with(sqlMapper.getId(), sqlDef.getId(), sqlMacro.getId()), new Exception(Message.MACRO_ARGS_NOT_ADMITTED_ERROR.with(sqlMapper.getId(), sqlDef.getId(), sqlMacro.getId())));
	}
	
	public MacroBodyNotAdmittedException(Exception e)
	{
		this(e.getMessage(), e);
	}
	
	public MacroBodyNotAdmittedException(String msg)
	{
		this(msg, new Exception(msg));
	}
	
	public MacroBodyNotAdmittedException(String msg, Exception e) {
		super(msg,e);					
	}

	private static final long serialVersionUID = -5122907321342394472L;

}
